- /* sdmprpup.cpp by K.Tsuru */
- // function ID 357 DRADIX, BRADIX
- /******************************************************************
- SDouble and SDecimal classes
- It examines whether it is proper to increase the precision by "upPrec"
- figures or not.It is provided for the reason that when the size exceeds
- the power of two by several figures,both the memory allocation and the FFT
- multiplication become inefficient.
- Although the value (effective figures)/4=509 is "PROPER", due to the use
- of "ProperUpPrec" in Exp(x) the evaluation time becomes later by about
- thirty persent, i.e. 3.5(sec)-->4.8(sec).
- *******************************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- uint SDouble::ProperUpPrec(uint upPrec) const {
- if(PreferSpeed() == OFF) return upPrec;
- uint ms = MaxSize(), sz = ceilpow2(ms);
- //When upPrec = 0 return 0.
- if(ms + upPrec <= sz) return min(sz - ms, upPrec);
- return 0;
- }
sdmprpup.cpp : last modifiled at 2015/11/25 20:20:03(954 bytes)
created at 2017/10/07 10:21:15
The creation time of this html file is 2017/10/07 10:30:03 (Sat Oct 07 10:30:03 2017).